package com.chenju.invokechainservice.dao;

import com.chenju.invokechainservice.domain.TClassNode;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;

import java.util.List;

public interface TClassNodeRepository extends Neo4jRepository<TClassNode, Long> {
    // @Query(value = "match (m:TClassNode) where m.name=$name return m")
    TClassNode findByName(String name);

    TClassNode findByNameAndApplicationName(String name, String applicationName);

    @Query("MATCH (n) DETACH DELETE n")
    void deleteAllNodesAndRelations();
}
